package io.renren.modules.store.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.store.dao.TStoreCashSiteDao;
import io.renren.modules.store.entity.TStoreCashSiteEntity;
import io.renren.modules.store.service.TStoreCashSiteService;


@Service("tStoreCashSiteService")
public class TStoreCashSiteServiceImpl extends ServiceImpl<TStoreCashSiteDao, TStoreCashSiteEntity> implements TStoreCashSiteService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TStoreCashSiteEntity> page = this.page(
                new Query<TStoreCashSiteEntity>().getPage(params),
                new QueryWrapper<TStoreCashSiteEntity>()
                        .eq(!params.get("sellerId").equals(""),"seller_id",params.get("sellerId"))
                .eq(params.get("equipmentId") != null,"equipment_id",params.get("equipmentId"))
        );

        return new PageUtils(page);
    }

}